
f = figure();
j=0;
for k=1:5
    j=j+1;
    subplot(3,7,j) 
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[20 20*j 900 500])%bottom, left, width and height of figure
end
j=0;
for k=6:12
    j=j+1;
    subplot(3,7,k+2)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[40 20*j 900 500])%bottom, left, width and height of figure
end
j=0;
for k=13:19
    j=j+1;
    subplot(3,7,k+2)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[60 20*j 900 500])%bottom, left, width and height of figure
end
j=0;

fileName = horzcat(modelname, '.png');
fileName=join(fileName, "");
saveas(f,fileName);

    
